//
//  busController.h
//  ElektroM
//
//  Created by Michael on 09.10.09.
//  Copyright 2009 Artgruppe inc. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "controllerWithTab.h"

@class AtomicElementViewController;
@class dataBase;
@class showInfoBusesController;
@class helpForBuses;

@interface busController : controllerWithTab  <UINavigationBarDelegate, 
								UITableViewDelegate, UITableViewDataSource>{
									
	showInfoBusesController* infoController;
									
	NSString* databaseName;							//! contains current database name to the current railway;
	
	IBOutlet UITableView* table;
	IBOutlet UISearchBar* searchBar;
	
	NSArray*	_aiBusInfos;
	NSArray* 	_aiBusNames;
	NSArray*	_aiBusTimes;
	// for determining if we've searched that text before:
	NSString* _strSearchText;
	
	dataBase* _db;
	bool _bLoadChild;
	
	AtomicElementViewController* detailedViewController;
	helpForBuses* helpDialog;
									
	IBOutlet UIActivityIndicatorView* busy;
}

@property (nonatomic,retain) NSString* databaseName;
@property (nonatomic,retain) showInfoBusesController* infoController;

@property (nonatomic, retain) IBOutlet UISearchBar* searchBar;
@property (nonatomic, retain) IBOutlet UITableView* table;

-(void) startSearch;
-(void) releaseStuff;
-(void) loadStuff;
-(IBAction) modalViewAction;
-(void) showLoadingIndicator;

@end
